package com.ls.pattern.chain.auth.optimize;

import com.ls.pattern.chain.auth.entity.Member;
import org.apache.commons.lang3.StringUtils;

/**
 * @author 挥之以墨
 */
public class ValidateHandler extends Handler<Member,Void> {
    @Override
    public Void doHandler(Member member) {
        if (StringUtils.isEmpty(member.getLoginName()) || StringUtils.isEmpty(member.getLoginPass())) {
            System.out.println("用户名和密码为空");
            return null;
        }
        System.out.println("用户名和密码不为空，继续执行");
        next.doHandler(member);
        return null;
    }
}
